<include file="Weixin/header" />
<title>登陆</title>
</head>
<body class="clearfix">
<div class="login-box">
    <div class="logo clearfix"><img src="__PUBLIC__/weixin/images/logo.png"></div>
    <div class="form clearfix">
        <div class="item">
            <input type="text" name="username" id="username" placeholder="请输入账号">
        </div>
        <div class="item">
            <input type="password" placeholder="请输入密码" id="password" name="password" />
            <div class="icon"><img src="__PUBLIC__/weixin/images/cld.png" ></div>
        </div>
        <div class="tex">
			<a href="./register.html" class="fl">创建新账号</a>
			<a href="javascript:void(0);" class="fr">忘记密码？</a>
		</div>
    </div>
    <div class="btn">
		<img src="__PUBLIC__/weixin/images/btn.png">
		<div class="tex login">登 录</div>
	</div>
	<!--提示框-->
	<div class="tdlgbg" style="display:none;">
        <div class="msgbox">
            <div class="text">
                <img src="__PUBLIC__/weixin/images/cg.png"> <br>
                <label>恭喜您，房间预约成功！</label>
            </div>
            <div class="btns">
                <ul>
                    <li class="fontblue rea">确 定</li>
                </ul>
            </div>
        </div>
    </div>
</div>
<script>
	$(document).ready(function(){
		$("div.login").on('click', function(){
			var data = {};
			var username = $("#username").val();
			var password = $("#password").val();
			if(username.length <= 0){
				layer.msg('请输入登陆帐号', {icon:5, time: 2000});
				return false;
			}else{
				data.username = username;
			}
			if(password.length <= 0){
				layer.msg('请输入登陆密码', {icon:5, time: 2000});
				return false;
			}else{
				data.password = password;
			}
			
			$.post('dologin.html', data, function(res){
				if(res.errCode/1){
					layer.msg(res.errMsg, {icon:1, time: 2000}, function(){
						javascript:history.go(-1);
					});
					//跳转地址
				}else{
					layer.msg(res.errMsg, {icon:0, time: 2000});
					return false;
				}
			},"JSON");
		});
	});
</script>
</body>
</html>